﻿@model ChangePasswordModel
@using SpotsHub.Gateway.Models.Customer;

@{
    Layout = "~/Views/Shared/_MyHUB.cshtml";

    ViewBag.Title = T("Account.MyAccount") + " - " + T("Account.ChangePassword");
    // +string+
}

@section left
{
    @Html.Partial("MyAccountNavigation", Model.NavigationModel, new ViewDataDictionary())
}
<div class="change-password-page customer-info-page">
    <h1>@T("Account.ChangePassword")</h1>
    <div class="my-hub-body section-wrapper account-info">
        <div class="row">
            <div class="col-xs-12 col-md-6">
                @Html.ValidationSummary(false)

                @Html.Action("RenderMessages", "Common")
                @using (Html.BeginForm())
                {
                    @Html.AntiForgeryToken()

                    if (!String.IsNullOrEmpty(Model.Result))
                    {
                        <span>@Model.Result</span>
                    }
                    else
                    {
                        <div class="password-container">
                            <div>@Html.RequiredHint() @Html.LabelFor(model => model.OldPassword):</div>
                            <div class="info-input">
                                @Html.PasswordFor(model => model.OldPassword, new { @class = "form-control", @placeholder = "Old Password" })
                            </div>

                            <div>@Html.RequiredHint() @Html.LabelFor(model => model.NewPassword):</div>
                            <div class="info-input">
                                @Html.PasswordFor(model => model.NewPassword, new { @class = "form-control", @placeholder = "New Password" })
                            </div>

                            <div>@Html.RequiredHint() @Html.LabelFor(model => model.ConfirmNewPassword):</div>
                            <div class="info-input">
                                @Html.PasswordFor(model => model.ConfirmNewPassword, new { @class = "form-control", @placeholder = "Re-type New Password" })
                            </div>

                        </div>
                        <div class="buttons">
                            @*<button type="button" href="" class="btn back-to-my-hub-button">Back to My HUB</button>*@
                            @*@Html.ActionLink("Back to My HUB", "Info", "Customer", new { area = "" }, new { @class = "button-grey" })*@
                            @*<button type="submit" class="btn change-password-button">@T("Account.ChangePassword.Button")</button>*@
                            <input type="submit" class="btn btn-normal form-control change-password-button" value="@T("Account.ChangePassword.Button")" />
                        </div>
                    }
                }
            </div>
            <div class="clear"></div>
        </div>
    </div>
</div>

